package ai.chat2db.server.domain.repository.config;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author Asu
 * @version 1.0
 * @date 2024/5/22 15:52
 * @desc 获取数据库链接配置
 */
@Configuration
public class NativeDataSourceConfig {

    public static DataSourceProperties DATA_SOURCE_PROPERTIES;
    @Resource
    private DataSourceProperties dataSourceProperties;

    @PostConstruct
    public void init() {
        DATA_SOURCE_PROPERTIES = this.dataSourceProperties;
    }
}
